#ifndef __GAMEOBJECT_H__
#define __GAMEOBJECT_H__

#include <string>
#include <vector>
#include <iostream>
#include "cocos2d.h"
#include "Box2D/Box2D.h"
#include "ccTypes.h"
#include "cocos-ext.h"


using std::vector;

typedef enum {
	OT_NONE,
	OT_USER,
	OT_OPENENT,
	OT_NPC,
	OT_ITEM
} _OBJECT_TYPE;

typedef enum {
	CHAR_IDLE,
	CHAR_READY_START,
	CHAR_READY,
	CHAR_READY_END,
	CHAR_RUN_START,
	CHAR_RUN,
	CHAR_RUN_END,
	CHAR_WALK_START,
	CHAR_WALK,
	CHAR_WALK_END,
	CHAR_BREATH_START,
	CHAR_BREATH,
	CHAR_BREATH_END,
	CHAR_FALLDOWN_START,
	CHAR_FALLDOWN,
	CHAR_FALLDOWN_END,
	CHAR_RUNJUMP_START,
	CHAR_RUNJUMP,
	CHAR_RUNJUMP_END
} _OBJECT_STATUS;

class GameObject
{
public:
	_OBJECT_TYPE type;
	_OBJECT_STATUS status;

	int strength;
	int stamina;
	int health;
	int stress;
	int speed;
	int acceleration;
	int weight;
	int reflexes;
	int jumping_ability;
	int intelligence;
	int braking;

    float curSpeed;

	std::string name;

	GameObject();

};

class GameItem : public GameObject
{
public:
	int price;

	std::string desc;

	GameItem();
};


class GameUser : public GameObject
{
public:

	bool autorun;

	cocos2d::extension::CCArmature *armature;

	std::vector<GameItem> items;

	GameUser(_OBJECT_TYPE type);

	void init();

	void update(float dt, float &_speed);
    
    void update(float dt);

};



#endif // __GAMEOBJECT_H__
